-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: install pkg-config for PyMySQL compatibility #894
Conversation
Dockerfile
Outdated
@@ -4,7 +4,7 @@ FROM ubuntu:focal as app | |||
|
|||
RUN apt-get update && \ | |||
apt-get upgrade -qy && apt-get install language-pack-en locales git \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
apt-get upgrade -qy && apt-get install language-pack-en locales git \ | |
apt-get upgrade -qy && DEBIAN_FRONTEND=noninteractive apt-get install language-pack-en locales git \ |
Otherwise the docker build will ask for input and hang. (See notes in edx/edx-arch-experiments#349)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, passing --no-install-recommends
to apt-get install might be even better, since tzdata was only a recommended transitive dependency. If it works, it's a good idea, since it will shrink your image sizes. But there's some chance you're depending on a recommended package without realizing it; up to you whether the risk is worth it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had success building the image with DEBIAN_FRONTEND=noninteractive
. The problem is, I am not sure how to test these image. I do not want to take change on thing I can't test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, DEBIAN_FRONTEND=noninteractive
should be safe. If xqueue is not something you can readily test, it's probably not worth shrinking the image size.
@@ -4,7 +4,7 @@ FROM ubuntu:focal as app | |||
|
|||
RUN apt-get update && \ | |||
apt-get upgrade -qy && apt-get install language-pack-en locales git \ | |||
python3.8-dev python3-virtualenv libmysqlclient-dev libssl-dev build-essential wget unzip -qy && \ | |||
python3.8-dev python3-virtualenv libmysqlclient-dev libssl-dev build-essential pkg-config wget unzip -qy && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be worth adding a comment to explain what these dependencies are for.
python3.8-dev python3-virtualenv libmysqlclient-dev libssl-dev build-essential pkg-config wget unzip -qy && \ | |
python3.8-dev python3-virtualenv \ | |
# mysqlclient build dependencies | |
libmysqlclient-dev libssl-dev build-essential pkg-config \ | |
wget unzip -qy && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That should work. Remaining suggestions are optional. :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
approved
edx/edx-arch-experiments#349